import { Request, Response } from 'express';

const checkPsw = {
  data: true,
  errCode: 0,
  errMsg: null,
  extend: null,
  redirectUrl: null,
  success: true,
  total: 0,
};
//{"code":"91330110MA2HXE3DX2","corpId":2,"name":"灵猫有数","signUrl":"https://smlfront.esign.cn:8890/identity/login?param=%2FPwAdBskCRy4fvxCluBqxXpA04%2Fe5WFXKC5vh3PrDHNZoy5MrrvAgA90hd2v7XqmmyyVAbVLIkZs1cHD1%2BAyuITX7SZ7rrQE5X3ddjDb29FLkNfJ%2FGEZ4Zhpr4w1S62NQ%2FwAlzHY3Gm91Af%2BvFKy0zUV73IcNhuZYVNgHKN%2BV9AK0G6Fs%2BwmDsrpnbp3eCcUHlgOeUnXW4MDN2OXjGyDHg%3D%3D&appId=7438807964&lang=zh-CN","status":2,"userId":3}
const userCorp = {
  data: {
    code: '91330110MA2HXE3DX2',
    corpId: 1,
    name: '灵猫有数',
    signUrl:
      'https://smlfront.esign.cn:8890/identity/login?param=Gt%2FgZugtmCg32%2FXVk245Cq%2BGfTXli6IbW1KQIwXcaCiPB4FPgqyyqJROUAoXualSWQ3BqWZAfvJtTxl2if7qndG5hKO%2Bjl8b6RE00ByZNNpZcvv6Avh7C7FVYe21Ljk1h3iCLWH45ohKUhlzdLNSKfhHhEQS6wzT8%2F3jL3xskduMygOWuxmyEsGrJl%2Bh808%2FEJVDiDvS6fNBQb9OvXLWOxHaqefri9h6WyZCC1RHBShSz%2FqffFWIm6b8rVpIwhOjOhIZnNLcTeXRo7kOsFF4Lw%3D%3D&appId=7438807964&lang=zh-CN',
    status: 2,
    userId: 23,
  },
  errCode: 0,
  errMsg: null,
  extend: null,
  redirectUrl: null,
  success: true,
  total: 0,
};
//
// 代码中会兼容本地 service mock 以及部署站点的静态数据
export default {
  // 支持值为 Object 和 Array
  'GET /oa/user/info': (req: Request, res: Response) => {
    res.send({
      data: {
        attributes: null,
        attrs: {},
        avatar: 'http://default_avatar',
        backFile: null,
        certNo: '411321**********3X',
        certType: 1,
        currentMobile: '13261170195',
        deleted: false,
        faceFile: null,
        gmtCreate: 1650007161000,
        gmtModified: 1662020767000,
        id: 23,
        name: '张三',
        perms: [
          'OA_LOAN_APPLY_MANAGE',
          'OA_SM_PUBLICITY',
          'OA_PROJECT_MANAGER_URGE',
          'OA_CORP_MANAGER_CHANGE_LEGAL',
          'OA_DAM_CHECK',
          'OA_SAM_QUERY',
          'OA_SALARY_SEARCH_MANAGE',
          'OA_SALARY_SEARCH_MANAGE_QUERY',
          'OA_AM_PUBLICITY2',
          'OA_SAS_PUBLICITY',
          'OA_AM_APPROVED',
          'OA_BANK_MANAGER_QUERY',
          'OA_CORP_MANAGER_QUERY',
          'OA_GM_WARNING',
          'OA_DAM_QUERY_APPROVED',
          'OA_GM_DOWNLOAD',
          'OA_AM_SALARY',
          'OA_DAM_PUBLICITY',
          'OA_SPECIAL_ACCOUNT_MANAGER',
          'OA_DAM_QUERY',
          'OA_SAS_DETAIL',
          'OA_BANK_APPLY_MANAGER',
          'OA_AC_CHECK',
          'OA_DAM_QUERY_LOG',
          'OA_GM_CHECK',
          'OA_GM_PAY_RECORD',
          'OA_BANK_SHELF_MANAGER',
          'OA_SAM_ATTENDANCE',
          'OA_AC_CANCEL_FILE_NOTICE',
          'OA_GM_UPLOAD',
          'OA_BA_QUERY',
          'OA_AC_CANCEL_FILE_GIVE',
          'OA_SAS_ATTENDANCE',
          'OA_PROJECT_MANAGER_EDIT',
          'OA_BA_APPROVAL',
          'DEPARTMENT_DIFFERENT_APPLY_MANAGER',
          'OA_GM_URGE',
          'OA_BANK_MANAGER',
          'OA_AM_GUARANTEE',
          'OA_SAM_CANCEL_FILE',
          'OA_GM_CANCEL_FILE',
          'OA_SAM_SALARY',
          'OA_SM_ROLE',
          'OA_GM_PROVE',
          'OA_SAS_PUBLICITY_GIVE',
          'OA_GM_APPROVED',
          'OA_SPECIAL_ACCOUNT_SALARY_MANAGER',
          'OA_SAS_CHECK',
          'OA_GM_QUERY',
          'OA_PROJECT_MANAGER_QUERY',
          'OA_PROJECT_BUILD_DATA',
          'OA_AC_CANCEL_FILE',
          'OA_AC_QUERY',
          'OA_GM_EXPORT_EXCEL',
          'OA_DAM_APPROVED',
          'OA_AM_PUBLICITY',
          'OA_SAS_QUERY',
          'OA_APPROVAL_MANAGE',
          'OA_AM_QUERY',
          'OA_SAS_PUBLICITY_LOOK',
          'OA_GM_CHECK_RECORD',
          'OA_SAM_WARNING',
          'OA_SM_DEPARTMENT',
          'OA_ACCOUNT_CANCEL_MANAGER',
          'OA_BA_AUDIT',
          'OA_DAM_GIVE_APPROVED',
          'OA_AC_MANAGER_APPROVAL',
          'OA_SYSTEM_MANAGER',
          'OA_PROJECT_MANAGER_DELETE',
          'OA_PROJECT_MANAGER',
          'OA_DATA_BOARD',
          'OA_SALARY_RECORD_WARN',
          'OA_DATA_SYNC',
          'OA_DIFFERENT_APPLY_MANAGER',
          'OA_GUARANTEE_MANAGER',
          'OA_SM_QA',
          'OA_DATA_COLLECTION',
          'OA_DATA_SYNC_JX',
          'OA_DATA_BANK',
        ],
        signUrl: null,
        status: 2,
        tag: 1,
        userId: 23,
      },
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },
  'GET /bank/user/info': (req: Request, res: Response) => {
    res.send({
      data: {
        attributes: '{"bankName":"上饶银行","bankId":2}',
        attrs: { bankName: '上饶银行', bankId: 2, mainBank: false },
        avatar: 'http://default_avatar',
        backFile: null,
        certNo: '411321**********3X',
        certType: 1,
        currentMobile: '13261170195',
        deleted: false,
        faceFile: null,
        gmtCreate: 1650007161000,
        gmtModified: 1662020767000,
        id: 23,
        name: '李猛',
        perms: [
          'BANK_LOAN_APPLY',
          'BANK_MARGIN_MANAGER',
          'BANK_SALARY_SUPPLEMENT_MANAGER',
          'BANK_SPECIAL_ACCOUNT_MANAGER',
          'BANK_SALARY_MANAGER',
          'BANK_MARGIN_ACCOUNT_MANAGER',
          'BANK_SYSTEM_MANAGER',
          'BANK_GUARANTEE_APPLY'
        ],
        signUrl: null,
        status: 2,
        tag: 1,
        userId: 23,
      },
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },
  'GET /tp/user/info': (req: Request, res: Response) => {
    res.send({
      data: {
        attributes: null,
        attrs: {
          thirdPlatformId: 1,
          thirdPlatformName: '江西方元担保公司',
          type: 2,
        },
        avatar: 'http://default_avatar',
        backFile: null,
        certNo: '411321**********3X',
        certType: 1,
        currentMobile: '13261170195',
        deleted: false,
        faceFile: null,
        gmtCreate: 1650007161000,
        gmtModified: 1650357135000,
        id: 23,
        name: '李*',
        perms: [
          'TP_MARGIN_ACCOUNT_MANAGER',
        ],
        signUrl: null,
        status: 2,
        tag: 1,
        userId: 23,
      },
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },
  'GET /api/user/info': (req: Request, res: Response) => {
    res.send({
      data: {
        attributes: null,
        attrs: {},
        avatar: 'http://default_avatar',
        backFile: null,
        certNo: '411321**********3X',
        certType: 1,
        currentMobile: '13261170195',
        deleted: false,
        faceFile: null,
        gmtCreate: 1650007161000,
        gmtModified: 1650357135000,
        id: 23,
        name: '李*',
        perms: ['OWNER_SYSTEM_MANAGER'],
        signUrl: null,
        status: 2,
        tag: 1,
        userId: 23,
      },
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },
  'GET /api/user/userIdCardInfo': (req: Request, res: Response) => {
    res.send({ "data": { "attributes": null, "attrs": {}, "avatar": "http://default_avatar", "backFile": "https://aurora-mediu-test.oss-cn-hangzhou.aliyuncs.com/user/f2f4d8b440f9b06dc405b22235c4999b.jpg?Expires=1650483183&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=DV5hT0gyJoxWGhaky6srSsBTDaE%3D", "certNo": "330881**********3X", "certType": 1, "currentMobile": "13857000245", "deleted": false, "faceFile": "https://aurora-mediu-test.oss-cn-hangzhou.aliyuncs.com/user/a8f5124e25eefe7b554c33668b5c3bef.jpeg?Expires=1650483183&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=TTQ%2Bm1uTX4%2BxbvQ7%2B8RHNHM2GBA%3D", "gmtCreate": 1650007161000, "gmtModified": 1650357135000, "id": 23, "name": "李**", "perms": null, "signUrl": "https://smlfront.esign.cn:8890/identity/login?param=Gt%2FgZugtmCg32%2FXVk245Cm6u%2FPo7RKMuRdHZTZzgTsPtAZ5FiWwYGOHp%2B%2Bwq67cjwQOXFTMXaKPxfNcctBeod%2BeYveMvLzOQVHBfy5Mdh6xK3iA1sn3192JIhZ6cSvlD%2BrcaomXDKNCKhoP0b4D5ku45nZvURV9E3ff87Ry%2FGmihDufth%2BOkEFLvahyajKYl0Voh%2FG9TTD%2BqFj71PWZjxDymK2Pv4b7gvCh3yt1ewaM%3D&appId=7438807964&lang=zh-CN", "status": 2, "tag": 1, "userId": 23 }, "errCode": 0, "errMsg": null, "extend": null, "redirectUrl": null, "success": true, "total": 0 })
  },
  'GET /corp/user/info': (req: Request, res: Response) => {
    res.send({
      data: {
        attributes: null,
        attrs: {},
        avatar: 'http://default_avatar',
        backFile: null,
        certNo: '411321**********3X',
        certType: 1,
        currentMobile: '13261170195',
        deleted: false,
        faceFile: null,
        gender: 0,
        gmtCreate: 1650007161000,
        gmtModified: 1662020767000,
        id: 23,
        name: '李猛',
        perms: ['OWNER_SYSTEM_MANAGER'],
        signUrl: null,
        status: 2,
        tag: 1,
        userId: 23,
      },
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },
  'GET /bank/user/userPasswordVerify': checkPsw,
  'GET /api/corp/getMyCorp': userCorp,
  // GET POST 可省略
  'GET /api/users': [
    {
      key: '1',
      name: 'John Brown',
      age: 32,
      address: 'New York No. 1 Lake Park',
    },
    {
      key: '2',
      name: 'Jim Green',
      age: 42,
      address: 'London No. 1 Lake Park',
    },
    {
      key: '3',
      name: 'Joe Black',
      age: 32,
      address: 'Sidney No. 1 Lake Park',
    },
  ],
  'POST /api/login/account': (req: Request, res: Response) => {
    const { password, userName, type } = req.body;
    if (password === 'ant.design' && userName === 'admin') {
      res.send({
        status: 'ok',
        type,
        currentAuthority: 'admin',
      });
      return;
    }
    if (password === 'ant.design' && userName === 'user') {
      res.send({
        status: 'ok',
        type,
        currentAuthority: 'user',
      });
      return;
    }
    if (type === 'mobile') {
      res.send({
        status: 'ok',
        type,
        currentAuthority: 'admin',
        success: true, errCode: 0
      });
      return;
    }

    res.send({
      status: 'error',
      type,
      currentAuthority: 'guest',
    });
  },
  'POST /api/user/logout': (req: Request, res: Response) => {
    res.send({ success: true, errCode: 0 });
  },
  'POST /bank/user/logout': (req: Request, res: Response) => {
    res.send({ success: true, errCode: 0 });
  }, 
  'POST /oa/user/logout': (req: Request, res: Response) => {
    res.send({ success: true, errCode: 0 });
  },
  'POST /logout': (req: Request, res: Response) => {
    res.send({ success: true, errCode: '302' });
  },
  'POST /api/corp/delete': (req: Request, res: Response) => {
    res.send({ success: true, errCode: '302' });
  },
  'POST /api/register': (req: Request, res: Response) => {
    res.send({ status: 'ok', currentAuthority: 'user' });
  },
  'POST /login/oauth': (req: Request, res: Response) => {
    res.send({
      data: {
        expiration: 1642508020825,
        refreshToken: { value: '0946ee12-e8eb-4907-931f-c597a9a98459', expiration: 1647684820825 },
        scope: ['all'],
        tokenType: 'bearer',
        value: '3f6ae83b-00cd-42a1-aa4d-25fa7d7463c5',
      },
      errCode: 0,
      success: true,
      total: 0,
    });
  },
  'POST /api/upload/resource': (req: Request, res: Response) => {
    res.send({
      data: {
        courseId: null,
        extension: 'docx',
        fileId: 'marginAccount/8371aa83d5882b662517686a2fd06807.docx',
        fileName: '农名工工资专户账户销户证明模板.docx',
        md5: '8371aa83d5882b662517686a2fd06807',
        preview: null,
        relativeUrl: null,
        size: 12457,
        type: 2,
        url: 'https://ossmediutestdaily.goodrs.cn/marginAccount/8371aa83d5882b662517686a2fd06807.docx?Expires=1661205585&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=n%2FFOZ4M4bc3wHuqHlgPNSaVPEkw%3D',
        userId: 23,
      },
      errCode: 0,
      errMsg: null,
      extend: null,
      log: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },
  'POST /open/upload/resource': (req: Request, res: Response) => {
    res.send({
      data: {
        courseId: null,
        extension: 'docx',
        fileId: 'marginAccount/8371aa83d5882b662517686a2fd06807.docx',
        fileName: '农名工工资专户账户销户证明模板.docx',
        md5: '8371aa83d5882b662517686a2fd06807',
        preview: null,
        relativeUrl: null,
        size: 12457,
        type: 2,
        url: 'https://ossmediutestdaily.goodrs.cn/marginAccount/8371aa83d5882b662517686a2fd06807.docx?Expires=1661205585&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=n%2FFOZ4M4bc3wHuqHlgPNSaVPEkw%3D',
        userId: 23,
      },
      errCode: 0,
      errMsg: null,
      extend: null,
      log: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },
  'GET /api/500': (req: Request, res: Response) => {
    res.status(500).send({
      timestamp: 1513932555104,
      status: 500,
      error: 'error',
      message: 'error',
      path: '/base/category/list',
    });
  },
  'GET /api/404': (req: Request, res: Response) => {
    res.status(404).send({
      timestamp: 1513932643431,
      status: 404,
      error: 'Not Found',
      message: 'No message available',
      path: '/base/category/list/2121212',
    });
  },
  'GET /api/403': (req: Request, res: Response) => {
    res.status(403).send({
      timestamp: 1513932555104,
      status: 403,
      error: 'Unauthorized',
      message: 'Unauthorized',
      path: '/base/category/list',
    });
  },
  'GET /api/401': (req: Request, res: Response) => {
    res.status(401).send({
      timestamp: 1513932555104,
      status: 401,
      error: 'Unauthorized',
      message: 'Unauthorized',
      path: '/base/category/list',
    });
  },

  'POST  /api/sms/send': (req: Request, res: Response) => {
    res.send({
      data: null,
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },

  'POST /api/message/read': (req: Request, res: Response) => {
    res.send({
      data: null,
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },

  'POST /api/message/readAll': (req: Request, res: Response) => {
    res.send({
      data: null,
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },

  'POST /open/bank/apply': (req: Request, res: Response) => {
    res.send({
      data: null,
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },

  'GET /open/publicity/list': {
    "data": [
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/1bba1c31779b4703f963748a0cc02baf.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/1bba1c31779b4703f963748a0cc02baf.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=WuxxNULjTrnruPKz3W9DY9%2B7t44%3D",
            "gmtCreate": 1698912177000,
            "gmtModified": 1698912177000,
            "id": 282,
            "targetId": 377,
            "title": "第八期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/6fba53a5901458327ba044a4998bb02d.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/6fba53a5901458327ba044a4998bb02d.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=xqykbRGCf7HO3ZrpAy0hVzWXOwA%3D",
            "gmtCreate": 1698064960000,
            "gmtModified": 1698064960000,
            "id": 275,
            "targetId": 371,
            "title": "第七期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/c735b08adbe50c4b067a73592b24475f.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/c735b08adbe50c4b067a73592b24475f.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=FArTI4VYnR1swLNwt2YShOn6VOw%3D",
            "gmtCreate": 1695873175000,
            "gmtModified": 1695873175000,
            "id": 269,
            "targetId": 368,
            "title": "第六期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/b5c91d0b56a712db19158bedab9c63f8.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/b5c91d0b56a712db19158bedab9c63f8.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=C9U4HA%2FVrmFuMHsXUtRXSUBtYjg%3D",
            "gmtCreate": 1692859685000,
            "gmtModified": 1692859685000,
            "id": 260,
            "targetId": 315,
            "title": "第一十七期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "上饶高铁经济试验区管理委员会社会发展局",
            "fileId": "project/997753f8441a17fca9d1fa30953f2fee.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/997753f8441a17fca9d1fa30953f2fee.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=qiV4xVwnCNtLlunnTCQ0Y0nDWdM%3D",
            "gmtCreate": 1692846167000,
            "gmtModified": 1692846167000,
            "id": 259,
            "targetId": 360,
            "title": "第二期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "万年县劳动监察局",
            "fileId": "project/303a0978956f6763ff67f976a8f2994f.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/303a0978956f6763ff67f976a8f2994f.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=lnXxlCOND7wTwFN8Wx4%2BIfQqzvk%3D",
            "gmtCreate": 1692844795000,
            "gmtModified": 1692844795000,
            "id": 258,
            "targetId": 357,
            "title": "第一期-万年",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/9cdfe802934bad4e33f140951dd2d133.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/9cdfe802934bad4e33f140951dd2d133.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=Jo7P3SfuwK8BVyPaLtwppN6ejVs%3D",
            "gmtCreate": 1692844786000,
            "gmtModified": 1692844786000,
            "id": 257,
            "targetId": 356,
            "title": "第四期-信州",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/09ab44e168c1153949c989395e449eb2.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/09ab44e168c1153949c989395e449eb2.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=cnepH569VdspYxNF4i4QeZz17o0%3D",
            "gmtCreate": 1692696686000,
            "gmtModified": 1692696686000,
            "id": 255,
            "targetId": 355,
            "title": "第三期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/ef77136db4ebdeeaa3f7f8de4f6a6df1.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/ef77136db4ebdeeaa3f7f8de4f6a6df1.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=LyEdZUzNVmw6eR13uAs8tRVzbEs%3D",
            "gmtCreate": 1692584762000,
            "gmtModified": 1692584762000,
            "id": 248,
            "targetId": 347,
            "title": "第二期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/e3d765d88a58cd4d428c8fe873a4a99e.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/e3d765d88a58cd4d428c8fe873a4a99e.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=0jA7f5dytRXYS9kpImtW6vCWNkU%3D",
            "gmtCreate": 1692583444000,
            "gmtModified": 1692583444000,
            "id": 246,
            "targetId": 344,
            "title": "第一期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "上饶市人社执法支队",
            "fileId": "project/00fcb69139960183808cfec88b2dccca.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/00fcb69139960183808cfec88b2dccca.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=g92L4oOMu2rwd1MRYW4RVDBESMs%3D",
            "gmtCreate": 1691054758000,
            "gmtModified": 1691054758000,
            "id": 229,
            "targetId": 338,
            "title": "第三期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "上饶市人社执法支队",
            "fileId": "project/00f323cd9f73b02bb940e0beac0bf302.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/00f323cd9f73b02bb940e0beac0bf302.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=ZnnMtGV9E0ODnOuwhzMjBbm0%2Bpw%3D",
            "gmtCreate": 1690854287000,
            "gmtModified": 1690854287000,
            "id": 226,
            "targetId": 335,
            "title": "第二期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "上饶市人社执法支队",
            "fileId": "project/a2260012990ef106e513e1c177497b1c.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/a2260012990ef106e513e1c177497b1c.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=BZRmJdxROPr8ptAqNogUdFgQcJI%3D",
            "gmtCreate": 1690264712000,
            "gmtModified": 1690264712000,
            "id": 218,
            "targetId": 331,
            "title": "第一期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "上饶高铁经济试验区管理委员会社会发展局",
            "fileId": "project/f9b58e9fa208fd531c0e4f952f21d9cf.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/f9b58e9fa208fd531c0e4f952f21d9cf.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=clyLEHg%2FFFoaruexTjpvpxf6B8k%3D",
            "gmtCreate": 1690264676000,
            "gmtModified": 1690264676000,
            "id": 217,
            "targetId": 332,
            "title": "第一期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "广丰区劳动监察局",
            "fileId": "project/d4e19de0000fd81182debca4f3a86893.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/d4e19de0000fd81182debca4f3a86893.pdf?Expires=1701440324&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=mJnBSRz9RHRSUjcIMQZwXEwwQc8%3D",
            "gmtCreate": 1688365671000,
            "gmtModified": 1688365671000,
            "id": 209,
            "targetId": 321,
            "title": "第二期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/92af2f9b8f720ebc843d23ce4c82d39f.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/92af2f9b8f720ebc843d23ce4c82d39f.pdf?Expires=1701440325&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=PEISKIJScCGxlJOYKm1G3SedgxU%3D",
            "gmtCreate": 1688354707000,
            "gmtModified": 1688354707000,
            "id": 208,
            "targetId": 320,
            "title": "第一十九期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "信州区劳动监察局",
            "fileId": "project/5a6b26d60c596ef9ee5d6f301ef9453d.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/5a6b26d60c596ef9ee5d6f301ef9453d.pdf?Expires=1701440325&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=0KSb6s7z8PUqKx7BIFQZSf6u5Ls%3D",
            "gmtCreate": 1688090129000,
            "gmtModified": 1688090129000,
            "id": 207,
            "targetId": 316,
            "title": "第一十八期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "上饶高铁经济试验区管理委员会社会发展局",
            "fileId": "project/32bab92ee5f5dd4b935c2b61811dee39.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/32bab92ee5f5dd4b935c2b61811dee39.pdf?Expires=1701440325&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=BMRu90eDpVKXQjqhfxwPYzCLREs%3D",
            "gmtCreate": 1687851209000,
            "gmtModified": 1687851209000,
            "id": 206,
            "targetId": 306,
            "title": "第九期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "三清山风景名胜区社会发展局",
            "fileId": "project/21a68a0252ba966470f653438a81163c.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/21a68a0252ba966470f653438a81163c.pdf?Expires=1701440325&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=pvFWi0nS%2FG4H%2BPR0sq2sRQ0VLQk%3D",
            "gmtCreate": 1687851192000,
            "gmtModified": 1687851192000,
            "id": 205,
            "targetId": 307,
            "title": "第二期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        },
        {
            "attachment": null,
            "attachmentUrl": null,
            "content": null,
            "deleted": false,
            "departmentName": "万年县劳动监察局",
            "fileId": "project/63a11b2be65f08499ba9dfc7977d1d37.pdf",
            "fileUrl": "https://ossmediutestdaily.goodrs.cn/project/63a11b2be65f08499ba9dfc7977d1d37.pdf?Expires=1701440325&OSSAccessKeyId=LTAI4GEK55XqzSuGXk9dnoVE&Signature=OWmS137h01BC6Wi%2F0fZg5Rw%2Bhzs%3D",
            "gmtCreate": 1687851184000,
            "gmtModified": 1687851184000,
            "id": 204,
            "targetId": 308,
            "title": "第三期",
            "type": 1,
            "userId": 1,
            "userName": "李猛"
        }
    ],
    "errCode": 0,
    "errMsg": null,
    "extend": null,
    "redirectUrl": null,
    "success": true,
    "total": 114
},

  'GET /api/message/list': (req: Request, res: Response) => {
    if (req.query.id == '1') {
      res.send({
        data: [
          {
            id: 1, //消息id
            targetId: 1, //消息端id
            targetType: 'CONSTRUCTION_UNIT', //消息端枚举
            contentType: 1001, //消息内容枚举类型
            title: '项目标题', //消息标题
            content: '', //消息内容
            userId: 1, //操作人id
            url: 'www.baidu.com', //跳转地址
            read: true, //是否已读
            attributes: '', //附加属性
            gmtCreate: '',
            gmtModified: '',
            deleted: false,
          },
          {
            id: 2, //消息id
            targetId: 1, //消息端id
            targetType: 'CONSTRUCTION_UNIT', //消息端枚举
            contentType: 1001, //消息内容枚举类型
            title: '项目标题', //消息标题
            content: '消息内容', //消息内容
            userId: 1, //操作人id
            url: 'www.baidu.com', //跳转地址
            read: true, //是否已读
            attributes: '', //附加属性
            gmtCreate: '',
            gmtModified: '',
            deleted: false,
          },
        ],
        errCode: 0,
        errMsg: null,
        extend: null,
        redirectUrl: null,
        success: true,
        total: 2,
      });
    } else {
      res.send({
        data: [
          {
            attributes: null,
            content: '差异化核定单申请（批次名称：2022-07-29核定申请）需要您的审批，请尽快批复',
            contentType: 3005,
            deleted: false,
            gmtCreate: 1659091909000,
            gmtModified: 1659091909000,
            id: 1862,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化核定审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/2/295',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content:
              '保证金缴纳证明申请（批次名称：0729项目01的缴纳证明申请）需要您的审批，请尽快批复',
            contentType: 3006,
            deleted: false,
            gmtCreate: 1659089274000,
            gmtModified: 1659089274000,
            id: 1720,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '缴纳证明审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/3/291',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '收到新的保证金缴纳审批反馈，请查收',
            contentType: 3012,
            deleted: false,
            gmtCreate: 1659088895000,
            gmtModified: 1659088895000,
            id: 1714,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '保证金缴纳审批结果通知',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/marginManage/pay',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '差异化公示申请（批次名称：2022-07-29公示申请）需要您的审批，请尽快批复',
            contentType: 3004,
            deleted: false,
            gmtCreate: 1659088691000,
            gmtModified: 1659088691000,
            id: 1702,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化公示审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/1/290',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '有新提交的保证金差异化申请，请尽快查验',
            contentType: 3008,
            deleted: false,
            gmtCreate: 1659088598000,
            gmtModified: 1659088598000,
            id: 1691,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化申请',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/marginManage/differentiation',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content:
              '保证金缴纳证明申请（批次名称：0729项目01的缴纳证明申请）需要您的审批，请尽快批复',
            contentType: 3006,
            deleted: false,
            gmtCreate: 1659088271000,
            gmtModified: 1659088271000,
            id: 1682,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '缴纳证明审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/3/289',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content:
              '工资公示证明申请（批次名称：2022-07-29工资公示证明申请1）需要您的审批，请尽快批复',
            contentType: 3007,
            deleted: false,
            gmtCreate: 1659088196000,
            gmtModified: 1659088196000,
            id: 1673,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '工资公示证明审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/4/288',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '差异化公示申请（批次名称：0729项目01的2次公示申请）需要您的审批，请尽快批复',
            contentType: 3004,
            deleted: false,
            gmtCreate: 1659084819000,
            gmtModified: 1659084819000,
            id: 1518,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化公示审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/1/280',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '有新提交的保证金差异化申请，请尽快查验',
            contentType: 3008,
            deleted: false,
            gmtCreate: 1659084550000,
            gmtModified: 1659084550000,
            id: 1495,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化申请',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/marginManage/differentiation',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '0729的公示申请批次的保证金差异化申请公示已被拒绝，请尽快查验',
            contentType: 3009,
            deleted: false,
            gmtCreate: 1659084494000,
            gmtModified: 1659084494000,
            id: 1487,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化公示申请',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/marginManage/differentiation/2',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '差异化核定单申请（批次名称：2022-07-29核定申请）需要您的审批，请尽快批复',
            contentType: 3005,
            deleted: false,
            gmtCreate: 1659084376000,
            gmtModified: 1659084376000,
            id: 1480,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化核定审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/2/279',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '差异化公示申请（批次名称：2022-07-29公示申请）需要您的复核审批，请尽快批复',
            contentType: 3018,
            deleted: false,
            gmtCreate: 1659084342000,
            gmtModified: 1659084342000,
            id: 1469,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化公示复核审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/TYPE_DIFFERENT_PUBLICITY/278',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '有新提交的保证金差异化申请，请尽快查验',
            contentType: 3008,
            deleted: false,
            gmtCreate: 1659083748000,
            gmtModified: 1659083748000,
            id: 1462,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化申请',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/marginManage/differentiation',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '差异化公示申请（批次名称：2022-07-29公示申请）需要您的审批，请尽快批复',
            contentType: 3004,
            deleted: false,
            gmtCreate: 1659083066000,
            gmtModified: 1659083066000,
            id: 1450,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化公示审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/1/278',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '有新提交的保证金差异化申请，请尽快查验',
            contentType: 3008,
            deleted: false,
            gmtCreate: 1659083040000,
            gmtModified: 1659083040000,
            id: 1443,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化申请',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/marginManage/differentiation',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '有新提交的保证金缴纳申请，请尽快查验',
            contentType: 3011,
            deleted: false,
            gmtCreate: 1659079036000,
            gmtModified: 1659079036000,
            id: 1327,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '保证金缴纳申请',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/marginManage/pay',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '差异化核定单申请（批次名称：2022-07-29核定申请）需要您的审批，请尽快批复',
            contentType: 3005,
            deleted: false,
            gmtCreate: 1659078965000,
            gmtModified: 1659078965000,
            id: 1314,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化核定审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/2/274',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '差异化公示申请（批次名称：2022-07-29公示申请）需要您的审批，请尽快批复',
            contentType: 3004,
            deleted: false,
            gmtCreate: 1659078928000,
            gmtModified: 1659078928000,
            id: 1302,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化公示审批',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/approval/1/273',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '有新提交的保证金差异化申请，请尽快查验',
            contentType: 3008,
            deleted: false,
            gmtCreate: 1659078892000,
            gmtModified: 1659078892000,
            id: 1295,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '差异化申请',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/marginManage/differentiation',
            userId: 23,
            userName: '李猛1',
          },
          {
            attributes: null,
            content: '收到新的保证金缴纳审批反馈，请查收',
            contentType: 3012,
            deleted: false,
            gmtCreate: 1659078765000,
            gmtModified: 1659078765000,
            id: 1281,
            read: false,
            targetId: 0,
            targetType: 3,
            title: '保证金缴纳审批结果通知',
            url: 'http://worker.daily.nat300.top/#/laborSupervision/marginManage/pay',
            userId: 23,
            userName: '李猛1',
          },
        ],
        errCode: 0,
        errMsg: null,
        extend: null,
        log: null,
        redirectUrl: null,
        success: true,
        total: 21,
      });
    }
  },
  'GET /api/message/listMessageClientSubType': (req: Request, res: Response) => {
      res.send({
        "data": [
            {
                "value": 1,
                "label": "差异化申请"
            },
            {
                "value": 2,
                "label": "差异化公示 "
            },
            {
                "value": 3,
                "label": "差异化核订单 "
            }
        ],
        "errCode": 0,
        "success": true,
        "total": 0
    });
  },
  'GET /oa/user/personSignImg': (req: Request, res: Response) => {
    res.send({
      data: {
        personSignImgFileId: 'xxxx.png',
        personSignImgFileUrl: 'http://xxx.png',
        base64:
          '',
      },
      errCode: 0,
      errMsg: null,
      extend: null,
      redirectUrl: null,
      success: true,
      total: 0,
    });
  },
};
